package edu.zut.main.thread;

public class ThreadStop {


    public static void main(String[] args) {

        Thread thread = new Thread(() -> {
            int i = 0;
            while (true) {
                System.out.println(Thread.currentThread().getName());
                i++;
                if (i == 20){
                    break;
                }
            }
        },"线程A");
        thread.start();
    }



}
